CREATE TABLE [dbo].[TMDOCU_PRIN]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[CO_PROV] [dbo].[TD_VC_020] NOT NULL,
[CO_TIPO_DOCU] [dbo].[TD_VC_003] NOT NULL,
[NU_DOCU_PROV] [dbo].[TD_VC_020] NOT NULL,
[NU_PROC] [dbo].[TD_IN_001] NOT NULL CONSTRAINT [DF__TMDOCU_PR__NU_PR__218BE82B] DEFAULT ((0)),
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TMDOCU_PR__CO_US__22800C64] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TMDOCU_PR__FE_US__2374309D] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TMDOCU_PR__CO_US__246854D6] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TMDOCU_PR__FE_US__255C790F] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TMDOCU_PRIN] ADD CONSTRAINT [PK__TMDOCU_P__0893B12A471D5F8D] PRIMARY KEY CLUSTERED  ([CO_EMPR], [CO_PROV], [CO_TIPO_DOCU], [NU_DOCU_PROV], [NU_PROC]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TMDOCU_PRIN] ADD CONSTRAINT [FK__TMDOCU_PRIN__7CA54796] FOREIGN KEY ([CO_EMPR], [CO_PROV], [CO_TIPO_DOCU], [NU_DOCU_PROV]) REFERENCES [dbo].[TMDOCU_PROV] ([CO_EMPR], [CO_PROV], [CO_TIPO_DOCU], [NU_DOCU_PROV])
GO
